package com.xq.dao.impl;

import com.xq.dao.UserDao;
import com.xq.pojo.User;

/**
 * @author xq
 * @version 1.0
 * @date 2021/4/5 12:09
 * @description 用户数据接口实现层
 */
public class UserDaoImpl implements UserDao {
    @Override
    public User getUserById(Integer id) {
        User u = null;
        switch (id) {
            case 1:
                u = new User(1,"张三","武汉");
                break;
            case 2:
                u = new User(2,"李四","珠海");
                break;
            case 3:
                u = new User(3,"王五","广州");
                break;
        }
        return u;
    }
}
